/*******************************************************************
This file is part of StartButton.

StartButton is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

StartButton is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with StartButton.  If not, see <http://www.gnu.org/licenses/>.

********************************************************************

StartButton is based on GreenButton by Doug Melton, available at 
http://www.supware.net/

StartButton info and bug reports:
allleimo@interfree.it
*******************************************************************/

#pragma once

//----------------------------------------------------------------------
// Defaults for StartButton's settings
//

// Upon Start button press, handling will occur in this order:

// 1. IF StartButton can find the window with this _class name_,
//    (not window title), then activate it.

//#define SZ_ACTIVATE_DEFAULT TEXT("iLaunch")

// 2. ELSE run the following command:
//    A relative path here (not starting with "\\") will be prepended
//    with the localized "\Program Files\"

#define SZ_RUN_DEFAULT TEXT("iLaunch\\iLaunch.exe")
#define SZ_HOOK_TEXT_DEFAULT TEXT("")
#define SZ_HOOK_WINKEY_DEFAULT TEXT("")

//----------------------------------------------------------------------
// registry constants
//

#define SZ_STARTBUTTON_REG_KEY TEXT("Software\\iApps\\StartButton")
#define SZ_RUN_KEY			TEXT("Run")
#define SZ_HOOK_TEXT		TEXT("HookText")
#define SZ_HOOK_WINKEY		TEXT("HookWinKey")

//----------------------------------------------------------------------
// global constants
//

#define SZ_APP_NAME TEXT("StartButton")
#define SZ_APP_ABOUT TEXT("StartButton v0.3 - iApps Dev Team")

// macros
#define ARRAYSIZE(s) (sizeof(s) / sizeof(s[0]))

// the class name of the window that gets the StartButton WM_HOTKEY messages
#define GREEN_BUTTON_WINDOW_CLASS TEXT("HHTaskBar")

//----------------------------------------------------------------------
// Function prototypes
//
HWND InitInstance(HINSTANCE, LPWSTR, int);
int TermInstance(HINSTANCE, int);

// Window procedure
LRESULT CALLBACK MainWndProc(HWND, UINT, WPARAM, LPARAM);

// Specialized hook functions
void HookStartButton();
void UnhookStartButton();